﻿using MediatR;
using T.Basic.Domain.T.Basic.Dto;
using T.Basic.Domain.T.Basic.Model;
using T.Basic.Read.API.Appliction.Command.FuelCostCommand;
using T.Basic.Repository.BasicInterface;

namespace T.Basic.Read.API.Appliction.CommandHandlers.FuelCostHanders
{
    /// <summary>
    /// 获取经办人
    /// </summary>
    public class FuelCostGetHandledCommandHandler : IRequestHandler<FuelCostGetHandledCommand, List<FuelCost>>
    {
        private readonly IFuelCostRepository _FuelCostrepository;
        public FuelCostGetHandledCommandHandler(IFuelCostRepository fuelCostrepository)
        {
            _FuelCostrepository = fuelCostrepository;
        }
        public async Task<List<FuelCost>> Handle(FuelCostGetHandledCommand request, CancellationToken cancellationToken)
        {


            var showFuel = await _FuelCostrepository.GetAllAsync();
           

            return showFuel;


        }
    }
}
